import Vue from 'vue'
import App from './App'

import noData from '@/components/common/skeleton/exception/nodata/index';
Vue.component('noData',noData)
import skeleton from '@/components/common/skeleton/index';
Vue.component('skeleton',skeleton)

import waterMark from '@/components/global/watermark/index';
Vue.component('waterMark',waterMark)

import globalMixins from '@/mixins/global';
Vue.mixin(globalMixins);

/*
全局处理异常
*/
// Vue.mixin({
//     errorCaptured(err, vm, info){
//             uni.showToast({
//                 title: 'errorCaptured系统发生了异常',
//                 duration: 2000,
//                 icon:'none'
//             });
//             console.log('info:',info)
//             return false;
//     },
//   })
/*
导入自己的原型，让原型全局生效
 */
import decorator from '@/libs/decorator/index';

/*
使插件feign生效
 */
//import {} from '@/services/feign/index';

import store from './store'

//import skeletonMixins from '@/mixins/skeleton/index';

// Vue.mixin(skeletonMixins);

//系统错误捕获
// const errorHandler = (error, vm)=>{
//     uni.showToast({
//         title: 'errorHandler系统发生了异常',
//         duration: 2000,
//         icon:'none'
//     });
//     console.error(error);
// }

// Vue.config.errorHandler = errorHandler;
// Vue.prototype.$throw = function (error) {
//     return errorHandler(error, this);
// };

Vue.config.productionTip = true

Vue.prototype.$store = store

App.mpType = 'app'




const app = new Vue({
    store,
    ...App
})
app.$mount()
